<template>
  <div>
    <div class="customer_type">
      <el-button type="success" size="mini" @click="auditCustomerHope">审核</el-button>
    </div>
  </div>
</template>
<script>
import { ajax } from "@/store/yg/common/utils";

export default {
  props: [
    'row', 'data', 'more'
  ],
  data() {
    return {
      pid: '',
    };
  },
  mounted() {
    console.log(this.data)
  },
  methods: {
    async auditCustomerHope() {
      this.$confirm("是否审批通过潜在客户?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          ajax("auditCustomerHope", {id: this.data.id}).then(
            res => {
              console.log(res);
              if (res.code == 200) {
                this.$message.success("操作成功");
              } else {
                this.$message.error("操作失败");
              }
            },
            error => {
              console.log(error);
            }
          );
        })
        .catch(() => {});
    }
  }
};
</script>

<style scoped>
/deep/ .el-select {
  width: 100%;
}
.btn-group {
  float: right;
}
</style>
